/*
 * Copyright (c) ycq_work@163.com
 */

package com.mxg.blog.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mxg.blog.entity.Message;
import com.mxg.blog.mapper.MessageMapper;
import com.mxg.blog.service.MessageService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: ycq_work@163.com
 * @DATE: 2023/7/25 12:51
 * 留言接口实现
 */
@Service
public class MessageServiceImpl extends ServiceImpl<MessageMapper, Message> implements MessageService {
    private final MessageMapper messageMapper;

    public MessageServiceImpl(MessageMapper messageMapper) {
        this.messageMapper = messageMapper;
    }

    @Override
    public void sendMessage(String messageConnect, String messageEmail, String messagePhone, String messageName, String Ip){
        messageMapper.sendMessage(messageConnect, messageEmail, messagePhone, messageName, Ip);
    }

    // 获取所有的信息
    @Override
    public List<Message> getMessages(){
        return messageMapper.getMessages();
    }
}
